#pragma once

class StarSystem:
	public ICelestial
{
public:
	StarSystem(NodeCreation& nc);
	~StarSystem();

	/*-IRenderableObject--------------------------------------------------------*/
	void			RenderableBinder(uint treeCalcFlags);
	void			RenderableHelper(const uint i, ERenderQuality::Type quality, uint pendingInstances);

	/*-ICelestial---------------------------------------------------------------*/
	void			GenerateContent();
	void			DestroyContent();
	bool			CanBeHost();
	void			ProcessInitData(void* data);
	CameraDesc		GetChildCameraDesc();
	void			OnEnter();
	void			OnLeave();

	void			OnPreCalc();
	/*-INode--------------------------------------------------------------------*/
	void			OnTreeGoToUp(uint arg);

	/*--------------------------------------------------------------------------*/

	uint	GetStarId();
	void			CalculateChildsMovement();

private:
	StarSystemDesc  m_desc;
	uint	m_starid;
	uint	m_planets;

	bool			m_isCamInside;
	PointLight*		m_sunlight;
	std::vector<ICelestial*>	m_ownedCelestials; // gwiazdy, ksiezyce, planety itd.
};

